
// 请求头
//var rqUrl = 'https://asxsyd92.com'
// 请求处理
function requst(url, data, post_get) {
	return new Promise((resolve, reject) => {
		uni.showLoading({	title: '请稍等...'});
		uni.request({
			url: url,
			method: post_get || "GET",
			data: data || {},
			header: {
				'content-type': 'application/x-www-form-urlencoded',
				"Authorization":""
			},
			success: (res) => {
				console.log(res)
				uni.hideLoading();
				resolve(res)
			},
			fail: (res) => {
				uni.hideLoading();
				uni.showToast({
					title: "接口请求失败"
				})
				reject(res)
			}
		})
	})
}
 
module.exports = {

	requst: requst,
}